import request from "./httpload.js";

export function getCarList(params) {
  return request.get("/cars", { params: params });
}

export function createCar(data) {
  return request.post("/cars", data);
}

export function updateCar(data) {
  return request.put("/cars", data);
}

export function deleteCar(car_id) {
  return request.delete("/cars", { car_id: [car_id] });
}

// 删除车辆手机号
export function deleteCarPhone(car_phone_id) {
  return request.delete("/cars/phone", { car_phone_id: car_phone_id });
}

// 修改车辆手机号
export function updateCarPhone(data) {
  return request.put("/cars/phone", data);
}

// 添加车辆手机号
export function createCarPhone(data) {
  return request.post("/cars/phone", data);
}
